********************************
***Control Groups vs. No Audio***
********************************

clear all

********************
*Set Person Working*
*Change this to your name!!!!!
********************
*global carolina 0
*global emily 1

global emily 1
global carolina 0

*********************
*Load Files*
*********************

*Carolina's Computer*
if $carolina ==1  {
cap cd "~\Dropbox\Carolina-Emily-Project\Data\Study"
global out "..\..\Results\"
}


if $emily ==1  {
*Emily's Computer*
cap cd "~/Dropbox/SourceContent/Data/Study"
global out "../../Results/"
} 



*Robustness Versions*

*1. Base
global spec1covar`p'0 	"$lasso0"
global spec1covar`p'1 	"$lasso1"
global spec1restrict	""

***Moderates/Extreme***
*2. Drop Vote Flippers
global spec2covar`p'0 		"$lasso0"
global spec2covar`p'1 		"$lasso1"
global spec2restrict	"& wrongvote!=1"

*3. Drop Anti-Party Immigration Views
global spec3covar`p'0 		"$lasso0"
global spec3covar`p'1 		"$lasso1"
global spec3restrict	"& wrongview!=1"

*3. Drop Anti-Party Immigration Views
global spec3xcovar`p'0 		"$lasso0"
global spec3xcovar`p'1 		"$lasso1"
global spec3xrestrict	"& wrongview2!=1"

*4. Drop Independents
global spec4covar`p'0 		"$lasso0"
global spec4covar`p'1 		"$lasso1"
global spec4restrict	"& dem!=2"
	
*5. Drop Not Fan President
global spec5covar`p'0 		"$lasso0"
global spec5covar`p'1 		"$lasso1"
global spec5restrict	"& fanpres==1"

*6. Drop Polarized
global spec6covar`p'0 		"$lasso0"
global spec6covar`p'1 		"$lasso1"
global spec6restrict	"& rhigh==0"

*6x. Only Polarized
global spec6xcovar`p'0 		"$lasso0"
global spec6xcovar`p'1 		"$lasso1"
global spec6xrestrict		"& rhigh==1"

***Informed/Engaged***
*7. Drop Multiple News Types
global spec7covar`p'0 		"$lasso0"
global spec7covar`p'1 		"$lasso1"
global spec7restrict	"& informed1==0"
	
*8. Drop Bipartisan News
global spec8covar`p'0 		"$lasso0"
global spec8covar`p'1 		"$lasso1"
global spec8restrict	"& informed2==0"

*9. Drop Non-Voters (2016)
global spec9covar`p'0 		"$lasso0"
global spec9covar`p'1 		"$lasso1"
global spec9restrict	"& voted2016==1"

*9x. Drop Fast Survey 
global spec9xcovar`p'0 		"$lasso0"
global spec9xcovar`p'1 		"$lasso1"
global spec9xrestrict	"& fast==0"


***Demographics***
*10. Male
global spec10covar`p'0 		"$lasso0"
global spec10covar`p'1 		"$lasso1"
global spec10restrict	"& gender==0"
	
*11. Female
global spec11covar`p'0 		"$lasso0"
global spec11covar`p'1 		"$lasso1"
global spec11restrict	"& gender==1"
	
*12. White
global spec12covar`p'0 		"$lasso0"
global spec12covar`p'1 		"$lasso1"
global spec12restrict	"& race==1"
	
*13. Non-white
global spec13covar`p'0 		"$lasso0"
global spec13covar`p'1 		"$lasso1"
global spec13restrict	"& race!=1"

*14. Age<45
global spec14covar`p'0 		"$lasso0"
global spec14covar`p'1 		"$lasso1"
global spec14restrict	"& agegroup<4"
	
*15. Age>=45
global spec15covar`p'0 		"$lasso0"
global spec15covar`p'1 		"$lasso1"
global spec15restrict	"& agegroup>=4"

*16. College
global spec16covar`p'0 		"$lasso0"
global spec16covar`p'1 		"$lasso1"
global spec16restrict	"& collegeorhigher==1"
	
*17. Non-College
global spec17covar`p'0 		"$lasso0"
global spec17covar`p'1 		"$lasso1"
global spec17restrict	"& collegeorhigher==0"

*18. Full-time Employed
global spec18covar`p'0 		"$lasso0"
global spec18covar`p'1 		"$lasso1"
global spec18restrict	"& fulltimeemployed==1"
	
*19. Not Full-time Employed
global spec19covar`p'0 		"$lasso0"
global spec19covar`p'1 		"$lasso1"
global spec19restrict	"& fulltimeemployed==0"

*********************************
***Create Variables and Format***
*********************************
		
global lasso0 hispanic age55_64 candidate16_hillary candidate16_other ///
	immlevel_decrease gun_lessstrict abortion_illegal tax_toohigh health_notgvt ///
	occ_twitter occ_buzzfeed trumpfan lebronfan taylorfan bgatesfan ///
	obamafan obama_neutral topissue_health 
	
global lasso1 black hispanic age35_44 age45_54 hsdegree ///
	candidate16_hillary immlevel_decrease immlevel_same ///
	gun_same gun_lessstrict abortion_partlegal abortion_illegal tax_toohigh ///
	health_neutral health_notgvt i.freq_nytimes ///
	daily_tv occ_tv daily_newspaper i.freq_fox week_breitbart ///
	daily_breitbart occ_buzzfeed ///
	lebron_neutral obamafan trump_neutral trumpfan west topissue_tax 
	
global message1 "Anti"
global message2 "Anti"
global message3 "Pro"
global message4 "Pro"

global source1 "Trump"
global source2 "Obama"
global source3 "Trump"
global source4 "Obama" 

global party0 "Republicans"
global party1 "Democrats"
global var0 "ln(Probability Anti-Immigrant + 1)"
global var1 "ln(Probability Pro-Immigrant + 1)"
global dir0 "anti"
global dir1 "pro"

global color1 "blue"
global color0 "red"

global label1a0 "{bf:Anti}	"
global label2a0 "{bf:Anti}	"
global label3a0 "{bf:Pro}	"
global label4a0 "{bf:Pro}	"
global label1b0 "{bf:Trump}	"
global label2b0 "{bf:Obama}	"
global label3b0 "{bf:Trump}	"
global label4b0 "{bf:Obama}	"

foreach x in a b {
foreach y in 1 2 3 4 {
	global label`y'`x'1 ""
}
}



**************************************************
*CREATE Variables*
**************************************************

use 3_clean_data, replace

gen group1=treatment==5 | treatment==7 | treatment==0
gen group2=treatment==6 | treatment==8 | treatment==0
gen group3=treatment==1 | treatment==3 | treatment==0
gen group4=treatment==2 | treatment==4 | treatment==0

gen president=treatment==1 | treatment==2 | treatment==5 | treatment==6
gen actor=treatment==3 | treatment==4 | treatment==7 | treatment==8
gen turkey= treatment==9 | treatment==10
gen priming=turkey==1 | president==1
gen message=actor==1 | president==1

gen wrongvote=candidate2016==2 if recruit==0
replace wrongvote=candidate2016==1 if recruit==1

gen wrongview=pre_immlevel_anti==0 if recruit==0
replace wrongview=pre_immlevel_anti==1 if recruit==1
gen wrongview2=pre_immlevel_anti<1 if recruit==0
replace wrongview2=pre_immlevel_anti>0 if recruit==1

gen fanpres=(obamafan==1 & recruit==1) | (trumpfan==1 & recruit==0)

//Informed1 - 2 or more modes daily
gen informed1=0
replace informed1=1 if freq_newspaper==3 & freq_tv==3
replace informed1=1 if freq_newspaper==3 & freq_facebook==3
replace informed1=1 if freq_newspaper==3 & freq_twitter==3
replace informed1=1 if freq_tv==3 & freq_facebook==3
replace informed1=1 if freq_tv==3 & freq_twitter==3
replace informed1=1 if freq_twitter==3 & freq_facebook==3

//Informed2 - Right and Left Sources
gen informed2=0
replace informed2=1 if (freq_breitbart>1 | freq_fox>1) & (freq_msnbc>1 | freq_nytimes>1)

//Fast - Survey in less than 5 minutes
gen fast=timesurvey<=300


**************************************************
*1. Moderate/Extreme*
**************************************************

preserve

foreach m in "m" "ms" {
foreach p in 0 1 {
	gen b`m'`p'=.
	gen u`m'`p'=.
	gen l`m'`p'=.
}
}


gen n=_n

foreach p in 0 1 {

local n=0
	
foreach y in 4 3 2 1 {

foreach s in 6x 6 5 4 3x 3 2 1 {
	
	local n=`n'+1
 
	*Regression for Coefficients*
	reg ln1_prob_index_${dir`p'} message president ${spec`s'covar`p'} ///
		if (group`y'==1) & recruit==`p' ${spec`s'restrict}, robust
	
	*Anonymous Message - Beta_m*
	replace bm`p' = _b[message] if n==`n'
	replace um`p' = _b[message]+1.96*_se[message] if n==`n'
	replace lm`p' = _b[message]-1.96*_se[message] if n==`n'

	*Persuasion - Beta_ms *	
	replace bms`p' = _b[president] if n==`n'
	replace ums`p' = _b[president]+1.96*_se[president] if n==`n'
	replace lms`p' = _b[president]-1.96*_se[president] if n==`n'
	
	*Anonymous Message - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & president==0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if actor==0 & e(sample)==1
	replace g=1 if actor==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dm`n'`p'=round(r(p)*10000)/10000
	local dm`n'`p': di %6.3f `dm`n'`p''
	drop g res
	
	*Persuasion - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & treat!=0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if president==0 & e(sample)==1
	replace g=1 if president==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dms`n'`p'=round(r(p)*10000)/10000
	local dms`n'`p': di %6.3f `dms`n'`p''
	drop g res
	
	}
	
	local n=`n'+1
	
}

foreach m in "m" "ms" {

# delimit ;
twoway	
	(rcap l`m'`p' u`m'`p' n if 	n==8 | n==17 | n==26 | n==35 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if 		n==8 | n==17 | n==26 | n==35, mcolor(black) )	
	(rcap l`m'`p' u`m'`p' n if 	n==7 | n==16 | n==25 | n==34 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if 		n==7 | n==16 | n==25 | n==34, mcolor(black) msymbol(circle_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==6 | n==15 | n==24 | n==33 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==6 | n==15 | n==24 | n==33 , mcolor(black) msymbol(square_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==5 | n==14 | n==23 | n==32 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==5 | n==14 | n==23 | n==32 , mcolor(black) msymbol(diamond_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==4 | n==13 | n==22 | n==31 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==4 | n==13 | n==22 | n==31 , mcolor(black) msymbol(triangle_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==3 | n==12 | n==21 | n==30 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==3 | n==12 | n==21 | n==30 , mcolor(black) msymbol(X) )	
	(rcap l`m'`p' u`m'`p' n if 	n==2 | n==11 | n==20 | n==29 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==2 | n==11 | n==20 | n==29 , mcolor(black) msymbol(arrow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==1 | n==10 | n==19 | n==28 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==1 | n==10 | n==19 | n==28 , mcolor(black) msymbol(plus) )	
	, 
	xline(0, lcolor(black)) 
	ylabel(
	36	`" "{bf:P(Dist):}" "'
	35	`" "${label1a`p'}{it:`d`m'35`p''}" "'
	34	`" "${label1b`p'}{it:`d`m'34`p''}" "'
	33	`" "{it:`d`m'33`p''}" "'
	32	`" "{it:`d`m'32`p''}" "'
	31	`" "{it:`d`m'31`p''}" "'
	30	`" "{it:`d`m'30`p''}" "'
	29	`" "{it:`d`m'29`p''}" "'
	28	`" "{it:`d`m'28`p''}" "'
	27	" "
	26	`" "${label2a`p'}{it:`d`m'26`p''}" "'
	25	`" "${label2b`p'}{it:`d`m'25`p''}" "'
	24	`" "{it:`d`m'24`p''}" "'
	23	`" "{it:`d`m'23`p''}" "'
	22	`" "{it:`d`m'22`p''}" "'
	21	`" "{it:`d`m'21`p''}" "'
	20	`" "{it:`d`m'20`p''}" "'
	19	`" "{it:`d`m'19`p''}" "'
	18	" "
	17	`" "${label3a`p'}{it:`d`m'17`p''}" "'
	16	`" "${label3b`p'}{it:`d`m'16`p''}" "'
	15	`" "{it:`d`m'15`p''}" "'
	14	`" "{it:`d`m'14`p''}" "'
	13	`" "{it:`d`m'13`p''}" "'
	12	`" "{it:`d`m'12`p''}" "'
	11	`" "{it:`d`m'11`p''}" "'
	10	`" "{it:`d`m'10`p''}" "'
	9	" "
	8	`" "${label4a`p'}{it:`d`m'8`p''}" "'
	7	`" "${label4b`p'}{it:`d`m'7`p''}" "'
	6	`" "{it:`d`m'6`p''}" "'
	5	`" "{it:`d`m'5`p''}" "'
	4	`" "{it:`d`m'4`p''}" "'
	3	`" "{it:`d`m'3`p''}" "'
	2	`" "{it:`d`m'2`p''}" "'
	1	`" "{it:`d`m'1`p''}" "'
	, angle(0) labsize(small)) 
	xtitle(" " "{bf:${party`p'}}" "{it:${var`p'}}" " ")
	ytitle("")
	ylab(, nogrid)
	xlab(-.075(0.025).025)
	graphregion(color(white)) 
	legend(order(2 "Base"  4 "Drop Flip Voters" 
	6 "Drop Anti-Party Views" 8 "Only Party Views" 10 "Drop Independents"
	12 "Drop Non-Fan President" 14 "Drop Polarized" 16 "Only Polarized" ) 
	rows(2) size(*0.75) symxsize(*0.4))
	ylabel(, tlength(0))
	saving("$out/`m'`p'.gph", replace)
	;
	# delimit cr

	}	
}
	
# delimit ;
grc1leg "$out/m0.gph" "$out/m1.gph", 
	ycommon xcommon legendfrom("$out/m0.gph")
	graphregion(color(white)) 
	imargin(-4 -10 -6 -14) scale(1) 
	;
# delimit cr
graph export "$out/B4_Heterogeneity_AnonymousMessage.pdf", replace	


# delimit ;
grc1leg "$out/ms0.gph" "$out/ms1.gph", 
	ycommon xcommon legendfrom("$out/ms1.gph")
	graphregion(color(white)) 
	imargin(-4 -10 -6 -14) scale(1) 
	;
# delimit cr
graph export "$out/B4_Heterogeneity_Persuasion.pdf", replace	

restore

**************************************************
*2. Informed/Engaged*
**************************************************

preserve

foreach m in "m" "ms" {
foreach p in 0 1 {
	gen b`m'`p'=.
	gen u`m'`p'=.
	gen l`m'`p'=.
}
}


gen n=_n

foreach p in 0 1 {

local n=0
	
foreach y in 4 3 2 1 {

foreach s in 9x 9 8 7 1 {
	
	local n=`n'+1
 
	*Regression for Coefficients*
	reg ln1_prob_index_${dir`p'} message president ${spec`s'covar`p'} ///
		if (group`y'==1) & recruit==`p' ${spec`s'restrict}, robust
	
	*Anonymous Message - Beta_m*
	replace bm`p' = _b[message] if n==`n'
	replace um`p' = _b[message]+1.96*_se[message] if n==`n'
	replace lm`p' = _b[message]-1.96*_se[message] if n==`n'

	*Persuasion - Beta_ms *	
	replace bms`p' = _b[president] if n==`n'
	replace ums`p' = _b[president]+1.96*_se[president] if n==`n'
	replace lms`p' = _b[president]-1.96*_se[president] if n==`n'
	
	*Anonymous Message - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & president==0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if actor==0 & e(sample)==1
	replace g=1 if actor==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dm`n'`p'=round(r(p)*10000)/10000
	local dm`n'`p': di %6.3f `dm`n'`p''
	drop g res
	
	*Persuasion - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & treat!=0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if president==0 & e(sample)==1
	replace g=1 if president==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dms`n'`p'=round(r(p)*10000)/10000
	local dms`n'`p': di %6.3f `dms`n'`p''
	drop g res
	
	}
	
	local n=`n'+1
	
}

foreach m in "m" "ms" {

# delimit ;
twoway	
	(rcap l`m'`p' u`m'`p' n if 	n==5 | n==11 | n==17 | n==23 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if 		n==5 | n==11 | n==17 | n==23, mcolor(black) )	
	(rcap l`m'`p' u`m'`p' n if 	n==4 | n==10 | n==16 | n==22 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==4 | n==10 | n==16 | n==22 , mcolor(black) msymbol(square_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==3 | n==9 | n==15 | n==21 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==3 | n==9 | n==15 | n==21 , mcolor(black) msymbol(triangle_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==2 | n==8 | n==14 | n==20 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==2 | n==8 | n==14 | n==20 , mcolor(black) msymbol(diamond_hollow) )	
	(rcap l`m'`p' u`m'`p' n if 	n==1 | n==7 | n==13 | n==19 , horizontal lcolor(black)) 
	(scatter n b`m'`p' if 		n==1 | n==7 | n==13 | n==19 , mcolor(black) msymbol(X) )	
	, 
	xline(0, lcolor(black)) 
	ylabel(
	24	`" "{bf:P(Dist):}" "'
	23	`" "${label1a`p'}{it:`d`m'23`p''}" "'
	22	`" "${label1b`p'}{it:`d`m'22`p''}" "'
	21	`" "{it:`d`m'21`p''}" "'
	20	`" "{it:`d`m'20`p''}" "'
	19	`" "{it:`d`m'19`p''}" "'
	18	" "
	17	`" "${label2a`p'}{it:`d`m'17`p''}" "'
	16	`" "${label2b`p'}{it:`d`m'16`p''}" "'
	15	`" "{it:`d`m'15`p''}" "'
	14	`" "{it:`d`m'14`p''}" "'
	13	`" "{it:`d`m'13`p''}" "'
	12	" "
	11	`" "${label3a`p'}{it:`d`m'11`p''}" "'
	10	`" "${label3b`p'}{it:`d`m'10`p''}" "'
	9	`" "{it:`d`m'9`p''}" "'
	8	`" "{it:`d`m'8`p''}" "'
	7	`" "{it:`d`m'7`p''}" "'
	6	" "
	5	`" "${label4a`p'}{it:`d`m'5`p''}" "'
	4	`" "${label4b`p'}{it:`d`m'4`p''}" "'
	3	`" "{it:`d`m'3`p''}" "'
	2	`" "{it:`d`m'2`p''}" "'
	1	`" "{it:`d`m'1`p''}" "'
	, angle(0) labsize(small)) 
	xtitle(" " "{bf:${party`p'}}" "{it:${var`p'}}" " ")
	ytitle("")
	ylab(, nogrid)
	graphregion(color(white)) 
	legend(order(2 "Base - Index"  4 "Drop Multiple News Types" 
	6 "Drop Bipartisan News" 8 "Drop Non-Voters (2016)" 10 "Drop Fast Survey")
	rows(2) size(*0.75) symxsize(*0.4))
	ylabel(, tlength(0))
	saving("$out/`m'`p'.gph", replace)
	;
	# delimit cr

	}	
}
	
# delimit ;
grc1leg "$out/m0.gph" "$out/m1.gph", 
	ycommon xcommon legendfrom("$out/m0.gph")
	graphregion(color(white)) 
	imargin(-3 -8 -6 -7) scale(1.1) 
	;
# delimit cr
graph export "$out/B5_Heterogeneity_AnonymousMessage.pdf", replace	


# delimit ;
grc1leg "$out/ms0.gph" "$out/ms1.gph", 
	ycommon xcommon legendfrom("$out/ms1.gph")
	graphregion(color(white)) 
	imargin(-3 -3 -6 -7) scale(1.1) 
	;
# delimit cr
graph export "$out/B5_Heterogeneity_Persuasion.pdf", replace	

restore


**************************************************
*3. Demographics*
**************************************************

preserve

foreach m in "m" "ms" {
foreach p in 0 1 {
	gen b`m'`p'=.
	gen u`m'`p'=.
	gen l`m'`p'=.
}
}


gen n=_n


foreach p in 0 1 {

local n=0
	
foreach y in 4 3 2 1 {

foreach s in 19 18 17 16 15 14 13 12 11 10 {
	
	local n=`n'+1
 
	*Regression for Coefficients*
	reg ln1_prob_index_${dir`p'} message president ${spec`s'covar`p'} ///
		if (group`y'==1) & recruit==`p' ${spec`s'restrict}, robust
	
	*Anonymous Message - Beta_m*
	replace bm`p' = _b[message] if n==`n'
	replace um`p' = _b[message]+1.96*_se[message] if n==`n'
	replace lm`p' = _b[message]-1.96*_se[message] if n==`n'

	*Persuasion - Beta_ms *	
	replace bms`p' = _b[president] if n==`n'
	replace ums`p' = _b[president]+1.96*_se[president] if n==`n'
	replace lms`p' = _b[president]-1.96*_se[president] if n==`n'
	
	*Anonymous Message - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & president==0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if actor==0 & e(sample)==1
	replace g=1 if actor==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dm`n'`p'=round(r(p)*10000)/10000
	local dm`n'`p': di %6.3f `dm`n'`p''
	drop g res
	
	*Persuasion - P(Dist)*
	reg ln1_prob_index_${dir`p'} ${spec`s'covar`p'} ///
		if (group`y'==1 & treat!=0) & recruit==`p' ${spec`s'restrict}, robust
	predict res, res
	gen g=0 if president==0 & e(sample)==1
	replace g=1 if president==1 & e(sample)==1
	ksmirnov res if e(sample), by(g)
	local dms`n'`p'=round(r(p)*10000)/10000
	local dms`n'`p': di %6.3f `dms`n'`p''
	drop g res
	
	}
	
	local n=`n'+1
	
}

foreach m in "m" "ms" {

# delimit ;
twoway	
	(rcap l`m'`p' u`m'`p' n if n==10 | n==21 | n==32 | n==43 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==10 | n==21 | n==32 | n==43 , mcolor(black) msymbol(circle))	
	(rcap l`m'`p' u`m'`p' n if n==9 | n==20 | n==31 | n==42 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==9 | n==20 | n==31 | n==42 , mcolor(black) msymbol(circle_hollow))	
	(rcap l`m'`p' u`m'`p' n if n==8 | n==19 | n==30 | n==41 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==8 | n==19 | n==30 | n==41 , mcolor(black) msymbol(square))	
	(rcap l`m'`p' u`m'`p' n if n==7 | n==18 | n==29 | n==40 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==7 | n==18 | n==29 | n==40 , mcolor(black) msymbol(square_hollow))	
	(rcap l`m'`p' u`m'`p' n if n==6 | n==17 | n==28 | n==39 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==6 | n==17 | n==28 | n==39 , mcolor(black) msymbol(triangle))	
	(rcap l`m'`p' u`m'`p' n if n==5 | n==16 | n==27 | n==38 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==5 | n==16 | n==27 | n==38 , mcolor(black) msymbol(triangle_hollow))	
	(rcap l`m'`p' u`m'`p' n if n==4 | n==15 | n==26 | n==37 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==4 | n==15 | n==26 | n==37 , mcolor(black) msymbol(diamond))	
	(rcap l`m'`p' u`m'`p' n if n==3 | n==14 | n==25 | n==36 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==3 | n==14 | n==25 | n==36 , mcolor(black) msymbol(diamond_hollow))	
	(rcap l`m'`p' u`m'`p' n if n==2 | n==13 | n==24 | n==35 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==2 | n==13 | n==24 | n==35 , mcolor(black) msymbol(arrowf))	
	(rcap l`m'`p' u`m'`p' n if n==1 | n==12 | n==23 | n==34 , horizontal lcolor(black)) 
	(scatter n b`m'`p'  if n==1 | n==12 | n==23 | n==34 , mcolor(black) msymbol(arrow))	
	, 
	xline(0, lcolor(black)) 
	ylabel(
	43	`" "${label1a`p'}			{it:Male}" "'
	42	`" "${label1b`p'}		  {it:Female}" "'
	41	`" "{it:White}" "'
	40	`" "{it:Non-White}" "'
	39	`" "{it:Age <45}" "'
	38	`" "{it:Age 45+}" "'
	37	`" "{it:College or More}" "'
	36	`" "{it:Less than College}" "'
	35	`" "{it:Fulltime Emloyed}" "'
	34	`" "{it:Not Fulltime Employed}" "'
	33	" "
	32	`" "${label2a`p'}			{it:Male}" "'
	31	`" "${label2b`p'}		{it:Female}" "'
	30	`" "{it:White}" "'
	29	`" "{it:Non-White}" "'
	28	`" "{it:Age <45}" "'
	27	`" "{it:Age 45+}" "'
	26	`" "{it:College or More}" "'
	25	`" "{it:Less than College}" "'
	24	`" "{it:Fulltime Emloyed}" "'
	23	`" "{it:Not Fulltime Employed}" "'
	22	" "
	21	`" "${label3a`p'}			{it:Male}" "'
	20	`" "${label3b`p'}		  {it:Female}" "'
	19	`" "{it:White}" "'
	18	`" "{it:Non-White}" "'
	17	`" "{it:Age <45}" "'
	16	`" "{it:Age 45+}" "'
	15	`" "{it:College or More}" "'
	14	`" "{it:Less than College}" "'
	13	`" "{it:Fulltime Emloyed}" "'
	12	`" "{it:Not Fulltime Employed}" "'
	11	" "
	10	`" "${label4a`p'}			{it:Male}" "'
	9	`" "${label4b`p'}		{it:Female}" "'
	8	`" "{it:White}" "'
	7	`" "{it:Non-White}" "'
	6	`" "{it:Age <45}" "'
	5	`" "{it:Age 45+}" "'
	4	`" "{it:College or More}" "'
	3	`" "{it:Less than College}" "'
	2	`" "{it:Fulltime Emloyed}" "'
	1	`" "{it:Not Fulltime Employed}" "'
	, angle(0) labsize(small)) 
	xtitle(" " "{bf:${party`p'}}" "{it:${var`p'}}" " ")
	ytitle(" ")
	ylabel(, tlength(0))
	ylab(, nogrid)
	graphregion(color(white)) 
	legend(off)
	saving("$out/`m'`p'.gph", replace)
	;
	# delimit cr
	
}


}


# delimit ;
graph combine "$out/m0.gph" "$out/m1.gph", 
	ycommon xcommon 
	graphregion(color(white)) 
	imargin(-8 0 -8 -7) scale(0.69) ysize(6)
;
# delimit cr
graph export "$out/B6_Heterogeneity_AnonymousMessage.pdf", replace	

# delimit ;
graph combine "$out/ms0.gph" "$out/ms1.gph", 
	ycommon xcommon 
	graphregion(color(white))  
	imargin(-8 0 -8 -7) scale(0.69) ysize(6)
;
# delimit cr
graph export "$out/B7_Heterogeneity_Persuasion.pdf", replace	

	

restore




